package com.example.binder;

import android.os.Looper;
import android.os.ServiceManager;

public class ServiceDemo {
    public static void main(String[] args) {
        System.out.println("Service Start");
        //准备Looper循环执行
        Looper.prepareMainLooper();
        //设置为前台优先级
        android.os.Process.setThreadPriority(android.os.Process.THREAD_PRIORITY_FOREGROUND);
        //注册服务
        ServiceManager.addService("TestService", new TestService());
        Looper.loop();
    }
}
